/****** Object:  StoredProcedure [dbo].[spGetSanPhamListForPrint]    Script Date: 09/27/2012 21:20:00 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[spGetSanPhamListForPrint]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[spGetSanPhamListForPrint]
GO

/****** Object:  StoredProcedure [dbo].[spGetSanPhamListForPrint]    Script Date: 09/27/2012 21:20:00 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[spGetSanPhamListForPrint]
AS
	Begin
		select sp.*, nh.TenNH, dvt.TenDonVi
		from tbl_SanPham sp
		INNER JOIN tbl_NhomHang nh
		ON sp.MaNH = nh.MaNH
		INNER JOIN tbl_DonViTinh dvt
		ON sp.MaDonVi = dvt.MaDonVi						
		
		select * from tbl_CongTy
	End

GO


